package com.ruoyi.system.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.system.domain.TWithdrawalRecord;

/**
 * 提现记录Mapper接口
 * 
 * @author xiuddoo
 * @date 2025-09-17
 */
public interface TWithdrawalRecordMapper 
{
    /**
     * 查询提现记录
     * 
     * @param id 提现记录主键
     * @return 提现记录
     */
    public TWithdrawalRecord selectTWithdrawalRecordById(String id);

    /**
     * 查询提现记录列表
     * 
     * @param tWithdrawalRecord 提现记录
     * @return 提现记录集合
     */
    public List<TWithdrawalRecord> selectTWithdrawalRecordList(TWithdrawalRecord tWithdrawalRecord);

    /**
     * 新增提现记录
     * 
     * @param tWithdrawalRecord 提现记录
     * @return 结果
     */
    public int insertTWithdrawalRecord(TWithdrawalRecord tWithdrawalRecord);

    /**
     * 修改提现记录
     * 
     * @param tWithdrawalRecord 提现记录
     * @return 结果
     */
    public int updateTWithdrawalRecord(TWithdrawalRecord tWithdrawalRecord);

    /**
     * 删除提现记录
     * 
     * @param id 提现记录主键
     * @return 结果
     */
    public int deleteTWithdrawalRecordById(String id);

    /**
     * 批量删除提现记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTWithdrawalRecordByIds(String[] ids);
    
    /**
     * 获取总已审核统计总金额
     * 
     * @param id 需要统计的数据主键
     * @return 结果
     */
    public float sumTWithdrawalRecordApprovedById(@Param("id") String id,@Param("applicantType")String applicantType,@Param("userId")String userId);
    
    /**
     * 获取分润总数统计
     * 
     * @param id 需要统计的数据主键
     * @return 结果
     */
    public float sumTFundAllocationDetailById(@Param("userId") String userId,@Param("roleType") String roleType);
}
